
<!DOCTYPE html>
<extend name="Base/base" />
<block name='head'>  
    <meta charset="utf-8">
    <link href="/Public/Index/css/workflow.css" rel="stylesheet" /> 
    <style type="text/css">
        .t4{color:#bbb}
        /*出差小结－转交下一步骤开始*/
        .trip_title h2 {
            font-size:1.2em;
            margin:1.2em;
            color:#5077aa;
        }
        .trip_next h3 {
            font-weight:bold;
            font-size:1em;
        }
        .trip_next span.t1,.select_next .t3 {
            color:#36C;
        }
        .trip_next span.t2, .trip_next p.t3 {
            color:#F00;
        }
        .select_next {
            font-size:1.2em;
            margin:1.2em;

        }
        .select_next  input.se {
            margin-top:2em;
            margin-right:0.3em;
        }
        .people {
            margin-bottom:1.4em;
        }
        .trip_next p a {
            color:#36c;
            text-decoration:underline;
        }
        .trip_next p img {
            margin-left:0.5em;
        }
        .select_people {
            margin:1em;
        }
        .select_people .dd {
            background: #437dba;
            border: none;
            text-align: center;
            cursor: pointer;
            padding: 8px;
            width:6em;
            -moz-border-radius: 4px;
            -webkit-border-radius: 4px;
            border-radius: 4px;
            margin-right:0.8em;
            float:left;
            margin-bottom:1em;
        }
        .select_people .dd a {
            color:#fff;
        }
        .select_people .qk {
            float:left;
        }
        .select_people a {
            color:#36c;
        }
        
        
        .operator .people span{margin-right: 0.5em}
        /*出差小结－转交下一步骤结束*/
        .endFlow{display: inline-block;padding:0.3em 0.8em;text-align: center;background:#437dba;color:#fff;margin-top:1em}
    </style>
</block>
<block name="content" > 
    <form>
        <div class="bd">
            <div class="trip_title"><h2>{$runs.flow_name}－转交下一步骤</h2></div>
            <div class="work_cells trip_next">
                <div class="weui_cell">
                    <h3>流水号{$runs.run_id}-{$runs.flow_name}（{$runs.begin_time}）</h3>
                </div>
                <foreach name="runs.step" item="step">
                    <if condition="$step['user'] neq null">
                        <div class="weui_cell">
                            <p class="t3">第{$step.prcs_id}步：（当前步骤）{$step.prcs_name}&nbsp;&nbsp;
                            <foreach name='step.user' item='user'>
                                <if condition="$user['prcs_flag'] eq 2">
                                    <span class="t1" style="color:green">{$user.user_id|getChineseName}（办理中） </span>
                                    <elseif condition="$user['prcs_flag'] == 3 || $user['prcs_flag'] ==4"/>
                                    <span class="t1" style="color:blue">{$user.user_id|getChineseName}（已完结） </span>
                                </if>
                            </foreach>
                            </p>
                        </div>
                        <else/>
                        <div class="weui_cell">
                            <p>第<span class="t2">{$step.prcs_id}</span>步：{$step.prcs_name}</p>
                        </div>
                    </if>
                </foreach>
            </div>
            <div class="select_next">
                <p>选择下一步骤</p>  
                <notempty name="nexts">
                    <foreach name='nexts' item='next'>
                        <if condition="$next['one'] neq false">
                            <a class="checkDept" data-id="{$next.prcs_id}" data-name="{$next.prcs_name}">
                                <if condition="$flag eq 1">
                                    <img src="/Public/Index/img/s1.png" style="width:20px;">
                                    <input name="prcs_type" type="hidden" value="1" data-url="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}" />
                                    <input type="hidden" id="prcs_id_html" value="{$next.prcs_id}">
                                    <input type="hidden" id="prcs_name_html" value="{$next.prcs_name}">
                                    <input type="hidden" id="prcs_url_html" value="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}">
                                    <else/>
                                    <img src="/Public/Index/img/s2.png" style="width:20px;">
                                    <input name="prcs_type" type="hidden" value="0" data-url="{:U('getFlowUser',array('flow_id'=>$flow_id,'prcs_id'=>$next['prcs_id'],'run_id'=>$run_id,'auto_type'=>$auto_type))}" />
                                </if>
                                <label class="t3">{$next.prcs_name} </label></a><br/>
                            <else />
                            <a class="checkDept">
                                <label class="t4">{$next.prcs_name}（条件不满足） </label></a><br/>
                        </if>
                    </foreach>
                    <else/>
                    <span class="pointer endFlow" data-url="{:U('overFlow')}">结束流程</span>
                </notempty>
            </div>
            <div class="work_cells trip_next checkuser">
                <div class="weui_cell">
                    <h3 class="stepName"></h3>
                    <input type='hidden' name="prcs_id" id='prcs_id' value=''/> 
                    <input type='hidden' name="flow_id" id='flow_id' value='{$flow_id}'/> 
                    <input type='hidden' name="run_id" id='run_id' value='{$run_id}'/>
                    <input type='hidden' name="form_id" id='run_id' value='{$form_id}'/>
                    <input type='hidden' name="auto_type" id='auto_type' value='{$auto_type}'/>
                    <input type="hidden" name="over_user" id="over_user" value="{$current_user}">
                    <!--结束流程专用prcs_id-->
                    <input type='hidden' name="over_prcs_id" id='prcs_id' value='{$prcs_id}'/> 
                </div>

                <div class="weui_cell operator">
<!--                                    <p class="people main_user">主办人：
                                    <if condition="$count == 1">
                                        <span>
                                            <a>{$operator[0].user_name}</a>
                                            <img class="pointer delOperator" data-id="{$operator[0].user_id}" src="/Public/Index/img/close_red.png" alt="close" width="40" height="40" />
                                            <input type="hidden" name="user_id" value="{$operator[0].user_id}">
                                            <input type="hidden" name="user_name" value="{$operator[0].user_name}">
                                        </span>
                                    </if>
                                    </p>
                                    <p class="other_user">经办人：
                                    <if condition="$count == 1">
                                        <span>
                                            <a>{$operator[0].user_name}</a>
                                            <img class="pointer delOperator" data-id="{$operator[0].user_id}" src="/Public/Index/img/close_red.png" alt="close" width="40" height="40" />
                                            <input type="hidden" name="user_ids[]" value="{$operator[0].user_id}">
                                            <input type="hidden" name="user_names[]" value="{$operator[0].user_name}">
                                        </span>
                                        <elseif condition="$count >1 && $operator[0]['flag'] == 1" />
                                        <foreach name="$operator" item="row">
                                            <span style="margin-right:10px">
                                                <a>{$row.user_name}</a>
                                                <img class="pointer delOperator" data-id="{$row.user_id}" src="/Public/Index/img/close_red.png" alt="close" width="40" height="40" />
                                                <input type="hidden" name="user_ids[]" value="{$row.user_id}">
                                                <input type="hidden" name="user_names[]" value="{$row.user_name}">
                                            </span>
                                        </foreach>
                                    </if>
                                    </p>-->
                </div>      
                <notempty name="nexts">
                    <div class="select_people">
                        <div class="checkUser dd"><a>选择人员</a></div> 
                        <div class="qk"> <a class="pointer empty1 clear-user">清空</a></div>
                    </div>    
                </notempty>
            </div>
            <notempty name="nexts">
                <div class="button" style="text-align:center">
                    <a class="pointer sure btn-submit ajax-post" data-verify="all" data-url="{:U('nextStep')}" data-form="">确认转交</a>
                    <a class="pointer back btn-submit"  onclick="history.go(-1)">返回</a>
                </div>
            </notempty>
        </div>
    </form>
    <div class="button">
        <input type="hidden" id="url" value="{:U('getRunData',array('run_id'=>$run_id))}">
        <input type="hidden" id="operatorUrl" value="{:U('delOperator')}">
        <input type="hidden" id="feedbackUrl" value="{:U('getRunData',array('type'=>'feedback','run_id'=>$run_id))}">
        <a class="am-btn" onclick="history.go(-1)">返 回</a>
    </div>

</block>
<block name="script">
    <script type="text/javascript" src="/Public/Index/js/form.js"></script>
    <script type="text/javascript">
            $(initFlowStep())
            
    </script>
</block>
